package com.example.listmoudle.mounting

import androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.android.baselibrary.base.BaseActivity
import com.example.listmoudle.R
import com.example.listmoudle.arouter.RecyclerPath
import com.example.listmoudle.bean.MountingBean
import com.example.listmoudle.databinding.ActivityListMountingBinding

/**
 * @author: Mr.You
 * @create: 2022-12-02 11:46
 * @description:吸顶效果
 **/
@Route(path = RecyclerPath.RECYCLE_MOUNTING_LIST)
class MountingListActivity :BaseActivity<ActivityListMountingBinding>(){
    override fun getLayoutId(): Int = R.layout.activity_list_mounting

    override fun initView() {
        var list = arrayListOf<MountingBean>()
        for (i in 0 ..5){
            for (j in 0 ..5){
                list.add(MountingBean("北京第$i","丰城$j"))
            }
        }
        var mAdapter = MountingAdapter()
         mBinding.recycleViewMounting.run {
             addItemDecoration(MountingDecoration(this@MountingListActivity))
             layoutManager = LinearLayoutManager(this@MountingListActivity)
             adapter = mAdapter
         }
        mAdapter.setData(list)
    }



    override fun initListener() {


    }
}